<?php

class Map_Form_Point extends Zend_Form
{
    public function  __construct($options = null)
    {
        parent::__construct($options);

        $this->setAction(BASE_URL . '/map/point/save');
        $this->setAttrib('id', 'form_point');

        $this->addElement(new Zend_Form_Element_Hidden('point_pid'));

        $this->addElement(new Zend_Form_Element_Text('point_name', array(
            'label' => 'Point name',
            'required' => true
        )));

        $this->addElement(new Zend_Form_Element_Text('coord_lat', array(
            'label' => 'Coord lat',
            'required' => true
        )));
        $this->addElement(new Zend_Form_Element_Text('coord_lng', array(
            'label' => 'Coord lng',
            'required' => true
        )));

        $this->addElement(new Zend_Form_Element_Textarea('description', array(
            'label' => 'Description',
        )));

        $this->addElement(new Zend_Form_Element_Checkbox('is_public', array(
            'label' => 'Public point'
        )));
        $this->addElement(new Zend_Form_Element_Checkbox('is_shared', array(
            'label' => 'Shared point'
        )));

        $this->addElement(new Zend_Form_Element_Submit('point_submit', array(
            'label' => 'Save'
        )));
        $this->addElement(new Zend_Form_Element_Button('point_cancel', array(
            'label' => 'Cancel'
        )));
    }
}